<!doctype html>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html lang="en">


    <head>
        <meta charset="utf-8">
        <title>PA-Learning</title>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>

        <!---CSS Files-->
        <link rel="stylesheet" href="${pageContext.request.contextPath}/Vues/css/master.css">
        <link rel="stylesheet" href="${pageContext.request.contextPath}/Vues/css/tables.css">
        <link href="${pageContext.request.contextPath}/Vues/js/sh/shThemeDefault.css" rel="stylesheet" type="text/css" />
        <link href="${pageContext.request.contextPath}/Vues/js/sh/shCore.css" rel="stylesheet" type="text/css" />
        <!---jQuery Files-->
        <script src="${pageContext.request.contextPath}/Vues/js/jquery-1.7.1.min.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/jquery-ui-1.8.17.min.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/styler.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/jquery.tipTip.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/colorpicker.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/sticky.full.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/global.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/jquery.dataTables.min.js"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/sh/shCore.js" type="text/javascript"></script>
        <script src="${pageContext.request.contextPath}/Vues/js/sh/shBrushXml.js" type="text/javascript"></script>
        <!---Fonts-->
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700' rel='stylesheet' type='text/css'>
        <!--[if lt IE 9]>
        
        <![endif]-->
        <!--[if lte IE 8]>
        <script language="javascript" type="text/javascript" src="js/flot/excanvas.min.js"></script>
        <![endif]-->
    </head>
    <body>

        <!--- HEADER -->

        <div class="header">
            <a href="dashboard.html"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/logo.png" alt="Logo" /></a> 
            <div class="styler">
                <ul class="styler-show">
                    <li><div id="colorSelector-top-bar"></div></li>
                    <li><div id="colorSelector-box-head"></div></li>
                </ul>
            </div>
        </div>

        <div class="top-bar">
          
       
        <ul id="nav">
        <li id="user-panel">
          <img src="img/nav/usr-avatar.jpg" id="usr-avatar" alt="" />
          <div id="usr-info">
            <p id="usr-name">Bienvenue, <s:property value="session['login']"/>.</p>
            <p id="usr-notif">You have 6 notifications. <a href="#">View</a></p>
            <p><a href="deconnecterAdmin">D&eacute;connection</a></p>
          </div>
        </li>
        <li>
        <ul id="top-nav">
         <li class="nav-item">
             <a href="accueiladmin.jsp"><img src="${pageContext.request.contextPath}/Vues/img/nav/dash-active.png" alt="" /><p>Accueil</p></a>
         </li>
         
         <li class="nav-item">
             <a href="gestiondescours.jsp"><img src="${pageContext.request.contextPath}/Vues/img/nav/tb.png" alt="" /><p>Cour</p></a>
        <ul class="sub-nav">
							<a href="theme"><p>Theme</p></a>
							<a href="module"><p>Module</p></a>
							<a href="affect"><p>Affectation</p></a>
							<a href="parti"><p>Partie</p></a>
							<a href="sequenceadmin"><p>sequence</p></a>
						

				</ul>
       
          </li>
        
         <li class="nav-item">
           <a href="testAdmin"><img src="${pageContext.request.contextPath}/Vues/img/nav/widgets.png" alt="" /><p>Examen</p></a>
         </li>
         <li class="nav-item">
           <a href="grid.html"><img src="${pageContext.request.contextPath}/Vues/img/nav/grid.png" alt="" /><p>Messagerie</p></a>
           
         </li>
         <li class="nav-item">
           <a href="filemanager.html"><img src="${pageContext.request.contextPath}/Vues/img/nav/flm.png" alt="" /><p>Forum</p></a>
         </li>
         <li class="nav-item">
           <a href="findActualite"><img src="${pageContext.request.contextPath}/Vues/img/nav/gal.png" alt="" /><p>Actualit&eacute;</p></a>
         </li>
         <li class="nav-item">
           <a href="index"><img src="${pageContext.request.contextPath}/Vues/img/nav/icn.png" alt="" /><p>Comptes</p></a>
         </li>
         <li class="nav-item">
           <a href="Afficherprofiladmin?pk=<s:property value="pk"/>"><img src="${pageContext.request.contextPath}/Vues/img/nav/err.png" alt="" /><p>Profil</p></a>
          
         </li>
         
       </ul>
      </li>
     </ul>        </div>

        <!--- CONTENT AREA -->

        <div class="content container_12">
            <div class="box grid_12">
                <div class="box-head"><h2>Gestion des Modules</h2></div>
                <div class="box-content no-pad">
                    <ul class="table-toolbar">
                        <li><a href="#"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/plus.png" alt="" /> Ajouter</a></li>
                        <li><a href="#"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/delete.png" alt="" /> Supprimer</a></li>
                        <li><a href="#"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/save.png" alt="" />Valider</a></li>
                        <li><a href="#"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/print.png" alt="" /> Print</a></li>
                        <li><a href="#"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/up.png" alt="" /> Ascending</a></li>
                        <li><a href="#"><img src="${pageContext.request.contextPath}/Vues/img/icons/basic/down.png" alt="" /> Descending</a></li>
                    </ul>
                    <table class="display" id="dt2">
                        <thead>
                            <tr>
                               
                                <th>Theme</th>
                                <th>Description</th>
                                <th>Option</th>
                               <th></th>
                               
                            </tr>
                        </thead>
                        <tbody>
                        <s:iterator value="th">
                            <tr class="odd gradeX">
                                
                                <td><s:property value="Hoti"/> </td>
                                <td><s:property value="Deth"/></td>
                                <td><s:property value="opti"/></td>
                                
                                 <td><s:a href="findT?pk=%{Thid}"><img src="${pageContext.request.contextPath}/Vues/images/modifier.ico" /></s:a><s:a href="delT?pk=%{Thid}"><img src="${pageContext.request.contextPath}/Vues/images/supprimer.png" /></s:a></td> 
                            </tr>
                          </s:iterator> 
                        </tbody>
                    </table>
                </div>
            </div>


            <div class="box grid_6">
            <s:set name="visible" value="visibilite"></s:set>
            <s:if test="%{#visible ==null}" >
               <div class="box-head"><h2>Ajouter Theme</h2></div></s:if>
               <s:if test="%{#visible !=null}" >
               <div class="box-head"><h2>Modifier Theme</h2></div></s:if>
                            <div class="box-content">
                            <s:actionerror/>
                              <s:if test="%{#visible !=null}" >
                     <form action="updT" method="Post" enctype="multipart/form-data">
                      <s:hidden name="pk" value="%{pk}"></s:hidden>
                            <div class="box-content">
                                <div class="form-row">
                                    <label class="form-label">titre</label>
                                </div>
                               <div class="form-item"><s:textfield name="titre" value="%{titre}"></s:textfield> </div>
                                <div class="form-row">
                                    <p class="form-label">description</p></div>
                                    <div class="form-item"><s:textarea name="desc" value="%{desc}" style="width:315px;height:100px;"></s:textarea> </div>
                                   <div class="form-row">
                                    <p class="form-label">Visibilit&eacute;</p></div>
                                    <div class="form-item"><s:select name="option" list="%{#{'public':'public','prive':'prive'}}" value="%{option}" ></s:select> </div>
                                    <div class="form-row">
                                    <p class="form-label">Image:</p></div>
                                    <div class="form-item">  <s:file name="fileUpload" size="40" value="%{photo}"/> </div>
                                  <s:set name="visible" value="visibilite"></s:set>                             
                                <s:if test="%{#visible ==null}" >
                                <input type="submit" class="button black" value="Ajouter">
                                 </s:if>
                                 
                         <s:if test="%{#visible !=null}" >
                                <input type="submit" class="button orange" value="Modifier">
                                </s:if>
                                <div class="clear"></div>
                            </div>
                        </form>
                        </s:if>
                        <s:if test="%{#visible ==null}" >
                     <form action="addT" method="Post" enctype="multipart/form-data">
                   
                            <div class="box-content">
                                <div class="form-row">
                                    <label class="form-label">titre</label>
                                </div>
                               <div class="form-item"><s:textfield name="titre" value="%{titre}"></s:textfield> </div>
                                <div class="form-row">
                                    <p class="form-label">description</p></div>
                                    <div class="form-item"><s:textarea name="desc" value="%{desc}" style="width:315px;height:100px;"></s:textarea> </div>
                                   <div class="form-row">
                                    <p class="form-label">Visibilit&eacute;</p></div>
                                    <div class="form-item"><s:select name="option" list="%{#{'public':'public','prive':'prive'}}" value="%{option}" ></s:select> </div>
                                    <div class="form-row">
                                    <p class="form-label">Image:</p></div>
                                    <div class="form-item">  <s:file name="fileUpload" size="40" value="%{photo}"/> </div>
                                  <s:set name="visible" value="visibilite"></s:set>                             
                                <s:if test="%{#visible ==null}" >
                                <input type="submit" class="button black" value="Ajouter">
                                 </s:if>
                                 
                         <s:if test="%{#visible !=null}" >
                                <input type="submit" class="button orange" value="Modifier">
                                </s:if>
                                <div class="clear"></div>
                            </div>
                        </form>
                        </s:if>
                    </div>   
                    </div>
                      <s:if test="%{#visible !=null}" >
                    <div class="form-item">
                    
			<img alt="" src="<s:property value="photo"/>"/>
		</div>
		</s:if>
                    </div>
              
                            <div class="clear"></div>
                        </div>
                    </div>
            </div>
       




       
        <script> /* SCRIPTS */
            $(function () {
                $('#dt1').dataTable( {
                    "bJQueryUI": true   
                });
                $('#dt2').dataTable( {
                    "bJQueryUI": true     
                });
                $('#dt3').dataTable( {
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers"   
                }); /* For the data tables */
                $( "#eq > span" ).each(function() {
                    var value = parseInt( $( this ).text(), 10 );
                    $( this ).empty().slider({
                        value: value,
                        range: "min",
                        animate: true,
                        orientation: "vertical"
                    });
                });

                $( "#accordion" ).accordion({ fillSpace: true });

                $( "#tabs" ).tabs();

                $("#progressbar").progressbar({
                    value: 50
                });
            });
            
        </script>

    </body>
  


</html>